<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>AHP Create Vendor Entry</title>
</head>
<body bgcolor="98AFC7">
<script type="text/javascript" language="javascript" src="filter.js"></script>
<script type="text/javascript" language="javascript" src="validation.js"></script>
<script type="text/javascript">
	function departmentChanged(){
		var departmentDropDown = document.AddForm.department;
		var listIndex = departmentDropDown.selectedIndex;
		var baseIndex = 1;
		for (i=0; i<departmentDropDown.length;i++)
		{
			if(departmentDropDown[i].selected)
				baseIndex+=filterDropDown(i+1, document.AddForm.product,baseIndex);
		}
		document.getElementById("product").disabled=false;
	}
</script>
<table width="100%" height="100%" bgcolor="98AFC7" style="color: blue;">
	<tr>
		<td height="5%">
			<table align="center">
				<tr>
					<td align="center">
						<h1>Add New Vendor</h1>
					</td>
				</tr>
			</table>
		</td>
		<td height="5%">
			<table align="right">
				<tr>
					<td align="right">
						<input type="submit" value="Logout"/>
					</td>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td align="center">
		<form id = 'AddForm' name='AddForm' method="post" action="AddVendorServlet" onsubmit="return validate()">
			<table align="center" width="30%" height="100%" cellpadding="20">
				<tr>
					<td colspan="2" align="right">
						Vendor Name: 
					</td>
					<td colspan="6" align="left">
						<input type="text" name="vendorName" size="100%"/>
					</td>
				
				<tr>
					<td width="10%" align="left">
						Department: 
					</td>
					<td width="20%" align="center">
						<select id="department" name="department" onclick="departmentChanged()" onchange="departmentChanged()" multiple="multiple" size="6">
							<option value="61">61(Baby wear)</option>
							<option value="62">62(Children)</option>
							<option value="63">63(Adults/Ladies)</option>
							<option value="64">64(Adults/ Mens)</option>
							<option value="67">67(Inner Wear)</option>
						</select>
					</td>
					<td width="10%" align="left">
						Product:
					</td>
					<td width="20%" align="center">
						<select id="product"  name="product" disabled="disabled" multiple="multiple" size="13">
							<option selected="selected" >Select Product...</option>
						</select>
					</td>
					<td width="10%" align="left">
						Brand: 
					</td>
					<td width="20%" align="center">
						<select id="brand" name="brand" multiple="multiple" size="13">
							<option value="1">Tex Basic</option>
							<option value="2">Tex Collection</option>
							<option value="3">Promotion/Sales</option>
							<option value="4">Disney</option>
							<option value="5">Marvel</option>
						</select>
					</td>
					<td width="10%" align="left">
						Category: 
					</td>
					<td width="20%" align="center">
						<select id="category" name="category" multiple="multiple" size="2">
							<option value="1">Knit</option>
							<option value="2">Woven</option>
						</select>
					</td>
				</tr>
				<tr>
					<td colspan="3">&nbsp;</td>
					<td align="left">
						<input type="submit" value="Create"/>
					</td>
					<td align="left">
						<input type="button" value="Cancel" onclick="location='search.html'"/>
					</td>
					<td colspan="3">&nbsp;</td>
				</tr>
					
			</table></form>		
		</td>
	</tr>
</table>
</body>
</html>